package com.zrgk.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zrgk.bean.EmpBean;
import com.zrgk.service.EmpService;

@Controller
public class LoginController {
	@Autowired
	@Qualifier(value="empService")
	private EmpService empService;

	public EmpService getEmpService() {
		return empService;
	}

	public void setEmpService(EmpService empService) {
		this.empService = empService;
	}
	
	@RequestMapping("login.do")
	public String login(HttpServletRequest request,EmpBean emp){
		empService.loginEmp(emp);
		request.setAttribute("loginEmp",emp);
		return "/html/index.jsp";
		
	}

}
